<template>
  <div class="left-tab flx-align-center">
    <div class="item" v-for="(item, index) in systemTypeList" :key="index" :class="{ active: index == currentSystemTypeIndex }">
      <el-icon class="collapse-btn" size="18">
        <component :is="item.icon" />
      </el-icon>
      <span>{{ item.name }}</span>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { Collection, Money, Sell } from "@element-plus/icons-vue";

const currentSystemTypeIndex = ref(0);
const systemTypeList = [
  {
    name: "中知信知产系统",
    icon: Collection,
    path: "/"
  },
  {
    name: "财务系统",
    icon: Money,
    path: "/financial"
  },
  {
    name: "推广系统",
    icon: Sell,
    path: "/promotion"
  }
];
</script>

<style lang="scss" scoped>
.left-tab {
  .item {
    display: flex;
    align-items: center;
    padding: 5px 12px;
    margin-right: 8px;
    cursor: pointer;
    border-radius: 4px;
    span {
      margin-left: 5px;
    }
    &.active {
      color: #3370ff;
      background: rgb(51 112 255 / 14%);
    }
  }
}
</style>
e
